/**
  * @title: 用户模块
  * @description: 
  * @author JUN
  */
export default{
	namespaced:true,
	state:{
		token:uni.getStorageSync("weishi_token") || null,
		enterprise:uni.getStorageSync("weishi_enterprise") || null,//企业信息
		member:uni.getStorageSync("weishi_member") || null,//用户信息
	},
	mutations:{
		["GET_TOKEN"](state,payload){//获取token
			state.token = payload
			uni.setStorageSync("weishi_token",state.token)
		},
		["GET_enterprise"](state,payload){//获取企业信息
			state.enterprise = payload
			uni.setStorageSync("weishi_enterprise",state.enterprise)
		},
		["GET_member"](state,payload){//获取用户信息
			state.member = payload
			uni.setStorageSync("weishi_member",state.member)
		},
		["CLEAR_ALL"](){//清空所有信息
			uni.clearStorageSync();
		}
	}
}